package com.fun.feifun.modules.business.constant;


public enum SupplierTypeEnum {
    supplier("供货商","1"),
    selfSupplier("自供货商","2"),
    ;

    private String title;
    private String value;


    SupplierTypeEnum(String title, String value){
        this.title=title;
        this.value=value;
    }

    // 根据key获取value的方法
    public static String getTitleByValue(String value){
        for (SupplierTypeEnum status : SupplierTypeEnum.values()) {
            if (status.getValue().equals(value)) {
                return status.getTitle();
            }
        }
        return ""; // 如果没有找到，返回null
    }

    public String getValue() {
        return value;
    }

    public String getTitle() {
        return title;
    }
}
